<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>目录资源详情</title>
    @@include('../components/css.html')
</head>

<body>
@@include('../components/header.html')
<div class="main">
	<div class="resources-details-wrap">
		<div class="base-info-wrap clearfix">
			<div class="logo-wrap fl"></div>
			<div id='info-resources' class="info-wrap fl clearfix">
				<p class="info-name">--</p>
                <div class="base-wrap fl">
                    <ul class="info-resources">
                    	<li class="first-line clearfix">
                    		<div class="left-item-wrap">
	                            <span class="info-label">信息资源提供方：</span>
	                            <span class="info-value second-col provider" title=''>--</span>
                            </div>
                            <div class="right-item-wrap right-catalog">
	                            <span class="info-label">信息资源目录：</span>
	                            <span class="info-value resource-catalog" title=''>--</span>
                            </div>
                        </li>
                        <li class="clearfix">
                        	<div class="left-item-wrap">
	                            <span class="info-label">数据总量：</span>
	                            <span class="info-value"><span class="count">0</span>条</span>
                            </div>
                            <div class="right-item-wrap">
                            	<div class="inner-left-wrap shared-type">
		                            <span class="info-label">共享方式：</span>
		                            <span class="info-value shared">--</span>
	                        	</div>
	                        	<div class="inner-right-wrap">
		                            <span class="info-label">发布时间：</span>
		                            <span class="info-value publish">--</span>
	                            </div>
                            </div>
                        </li>
                    </ul>
                </div>
                <div id="operation-wrap" class="collect-wrap"></div>
				<script id="operation-wrap-template" type="text/x-handlebars-template">
				{{#if isLogin}}
                <div class="operation-wrap fr">
                    <button class="btn collection {{isCollection collectionstatus 0}}" onclick='changeCollectionState({{id}},1)'><i class="iconfont icon-L1"></i>收藏</button>
                    <button class="btn collection cancel-collection {{isCollection collectionstatus 1}}" onclick='changeCollectionState({{id}},0)'>取消收藏</button>

                    <a class="btn apply {{isApply subscriptionstatus 0}}" href="./directory-apply.html?id={{id}}"><i class="iconfont icon-shenqing"></i>申请</a>
                    <button class="btn apply cancel-apply {{isApply subscriptionstatus 1}}" onclick='changeApplyState({{id}})'>取消申请</button>
                </div>
                {{else}}
                <div class="operation-wrap unlogin fr">
                    <button class="btn collection"><i class="iconfont icon-L1"></i>收藏</button>

                    <a class="btn apply" href="javascript:void(0);"><i class="iconfont icon-shenqing"></i>申请</a>
                </div>
                {{/if}}
            </script>
            </div>
		</div>
		<div class="tab-wrap">
			<div class="tab-line">
				<ul class="tab-menu clearfix">
					<li class="tab-item menu-base active">基本信息</li>
					<li class="tab-item menu-data">信息项</li>
					<li class="tab-item">文件下载</li>
					<li class="tab-item">API服务</li>
					<li class="tab-item">其他</li>
				</ul>
			</div>
			<div class="details-con">
				<div class="info-item base-info clearfix">
					<div class="left-wrap fl">
                    	<div class="left-wrap-item">
							<p class="left-item-title">目录简介</p>
							<p class="catalog-summary">--</p>
						</div>
						<div class="left-wrap-item">
							<p class="left-item-title">目录统计</p>
							<div class="catalog-statistics clearfix">
								<p class="statistics-item fl">访问量：<span class="statistics-count visit-num">0</span>次</p>
								<p class="statistics-item use-count fl">使用量：<span class="statistics-count">0</span>次</p>
								<p class="statistics-item fl">收藏量：<span class="statistics-count">0</span>次</p>
							</div>
						</div>
						<div class="left-wrap-item chart-item">
							<div class="left-item-title clearfix">
								<span>图表统计</span>
								<div class="time-wrap fr clearfix">
										<input class="select-time my-Wdate fl" type="text" placeholder="请选择起始时间" id="d1" onclick="WdatePicker({minDate:'#F{$dp.$D(\'d2\',{d:-365});}',maxDate:'#F{$dp.$D(\'d2\',{d:-6})||\'%y-%M-{%d-6}}\'}'})"/>
										<span class="time-slide fl">--</span>
										<input class="select-time my-Wdate fl" type="text" placeholder="请选择截止时间" id="d2" onclick="WdatePicker({minDate:'#F{$dp.$D(\'d1\',{d:6});}',maxDate:'%y-%M-%d'})"/>
									<button class="btn time-confirm fl">确定</button>
								</div>
							</div>
							<div class="chart-wrap" id='statistics-chart'></div>
						</div>
					</div>
					<div class="right-wrap fr">
						<div class="right-item label-wrap">
							<p class="right-item-label label-title"><i class="iconfont icon-xiangqingyebiaoqian"></i>目录标签</p>
							<ul id = "label-list" class="label-list clearfix">
								
							</ul>
						</div>
						<div class="right-item related-directory-wrap">
							<p class="right-item-label directory-title"><i class="iconfont icon-mulu"></i>相关数据目录</p>
							<ul class="directory-list" id="dataCatalog">
								<script id="dataCatalog-template" type="text/x-handlebars-template">
									{{#if data}}
									{{#each data}}
									<li class="directory-list-item"><a href="./directory-resources-details.html?id={{id}}&resourcecode={{resourcecode}}">{{name}}</a></li>
									{{/each}}
									{{else}}
									<li>暂无数据</li>
									{{/if}}
								</script>
							</ul>
						</div>
					</div>
				</div>
				<div class="info-item data-item dn">
					<p class="inner-tab clearfix">
						<span class="inner-tab-item info-preview active">信息项预览</span>
						<span class="inner-tab-item data-preview">数据预览</span>
						<span class="download-data dn fr"><a>数据下载</a></span>
					</p>
					<div class="info-item-wrap">
						<table class="table" cellspacing="0">
		                   <thead>
		                        <tr>
		                            <td>序号</td>
		                            <td class="item-name">信息项名称</td>
		                            <td>数据类型</td>
		                            <td>数据长度</td>
		                            <td>共享类型</td>
		                            <td>共享条件</td>
		                            <td>是否向社会开放</td>
		                            <td>开放条件</td>
		                            <td>更新周期</td>
		                        </tr>
		                    </thead>
		                    <tbody id='info-item-table'>
		                    </tbody>
		                </table>
						<script id="info-item-table-template" type="text/x-handlebars-template">
							{{#if data}}
							{{#with data}}
		                        {{#each this}}
			                        <tr class="{{isEven @index}}">
			                            <td>{{addOne @index}}</td>
			                            <td class="item-name">{{name}}</td>
			                            <td>{{datatypename}}</td>
			                            <td>{{datalength}}</td>
			                            <td>{{sharingtype}}</td>
			                            <td>{{sharingcondition}}</td>
			                            <td class="whether-open {{isActive isopen}}"><i class="iconfont icon-baoliu"></i></td>
			                            <td>{{opencondition}}</td>
			                            <td>{{updatecyclename}}</td>
			                        </tr>
		                        {{/each}}
	                        {{/ with}}
	                        {{else}}
	                        	<tr>
	                        		<td colspan="9">
	                        			<p class="no-server">
		                            		<span class="no-server-txt">暂无数据</span>
		                            	</p>
	                        		</td>
	                        	</tr>
	                        {{/if}}
	                    </script>
                    </div>
                    <div class="data-item-wrap dn">
                    	<div class="logined">
                    		<div class="mis-matching dn">
	                    		<p class="no-server">
	                        		<span class="no-server-txt">暂无数据</span>
	                        	</p>
	                    	</div>
	                    	<div class="matching">
	                    		<div class="undocking dn">
									<span class="no-server-txt">数据资源尚未对接完成，请耐心等待或联系相关信息提供部门！</span>
								</div>
								<div class="unsubscribe dn">
									<span class="no-server-txt">
										您还未订阅该信息资源，成功订阅后后可以查看！ 
										<span class="toapply" onclick='toApply()'>点击申请订阅</span>
									</span>
								</div>
								<div class="normal">
									<table id='data-item-table' class="table" cellspacing="0"></table>
									<script id="data-item-table-template" type="text/x-handlebars-template">
										{{#if data}}
											<thead>
						                        <tr>
						                        	{{#each thList}}
						                            <td>{{this}}</td>
						                            {{/each}}
						                        </tr>
						                    </thead>
					                        <tbody>
					                        	{{#each tdList}}
						                        <tr class="{{isEven @index}}">
						                        	{{#each this}}
						                            <td>{{this}}</td>
						                        	{{/each}}
						                        </tr>
						                        {{/each}}
					                        </tbody>
				                        {{else}}
				                        	<tr class="no-data">
				                        		<td colspan="9">
				                        			<p class="no-server">
					                            		<span class="no-server-txt">暂无数据</span>
					                            	</p>
				                        		</td>
				                        	</tr>
				                        {{/if}}
				                    </script>
				                    <div class="page-wrap clearfix">
						                <div class="pagination fr clearfix"></div>
						                <span class="total-count fr">共0页，每页0条</span>
						            </div>
								</div>
                    		</div>
                		</div>
                    	<div class="unlogin dn">
							<span class="no-server-txt">尚未登录，请登录后查看！</span>
						</div>
                    </div>
				</div>
				<div class="info-item file-download clearfix dn">
					<div class="logined">
						<div class="mis-matching dn">
	                		<p class="no-server">
	                    		<span class="no-server-txt">暂无数据</span>
	                    	</p>
	                	</div>
	                	<div class="matching">
							<div class="undocking dn">
								<span class="no-server-txt">数据资源尚未对接完成，请耐心等待或联系相关信息提供部门！</span>
							</div>
							<div class="unsubscribe dn">
								<span class="no-server-txt">
									您还未订阅该信息资源，成功订阅后后可以查看！ 
									<span class="toapply" onclick='toApply()'>点击申请订阅</span>
								</span>
							</div>
							<div class="normal download-table-wrap">
								<table id="download-table" class="table" cellspacing="0"></table>
								<script id="download-table-template" type="text/x-handlebars-template">
				                    <thead>
				                        <tr>
				                            <td>文件名称</td>
				                            <td>发布时间</td>
				                            <td>下载量</td>
				                            <td>文件下载</td>
				                        </tr>
				                    </thead>
				                    <tbody>
				                    	{{#if data}}
				                    	{{#each data}}
				                    	<tr class="{{isEven @index}}">
				                            <td>{{column_name}}</td>
				                            <td>{{create_time}}</td>
				                            <td>{{downloadcount}}</td>
				                            <td>
												<a class="download" href='{{path}}/sourceinfo/downloadFile?filepath={{toEncode column_value}}&name={{column_name}}&catalog_resource_id={{catalog_resource_id}}'>下载</a>
				                            </td>
				                        </tr>
				                        {{/each}}
				                        {{else}}
				                        <tr class="no-data-line">
				                            <td colspan="6">
				                            	<p class="no-server">
				                            		<span class="no-server-txt">暂无数据</span>
				                            	</p>
				                            </td>
				                        </tr>
				                        {{/if}}
				                    </tbody>
				                </script>
				                <div class="page-wrap clearfix">
					                <div class="pagination fr clearfix"></div>
					                <span class="total-count fr">共0页，每页0条</span>
					            </div>
							</div>
						</div>
					</div>
					<div class="unlogin dn">
						<span class="no-server-txt">尚未登录，请登录后查看！</span>
					</div>
				</div>
				<div class="info-item api-service clearfix dn">
					<div class="logined">
						<div class="mis-matching dn">
	                		<p class="no-server">
	                    		<span class="no-server-txt">暂无数据</span>
	                    	</p>
	                	</div>
	                	<div class="matching">
							<div class="undocking dn">
								<span class="no-server-txt">数据资源尚未对接完成，请耐心等待或联系相关信息提供部门！</span>
							</div>
							<div class="unsubscribe dn">
								<span class="no-server-txt">
									您还未订阅该信息资源，成功订阅后后可以查看！ 
									<span class="toapply" onclick='toApply()'>点击申请订阅</span>
								</span>
							</div>
							<div class="normal api-normal">
								<div id="api-info" class="api-info"></div>
								<script id="api-info-template" type="text/x-handlebars-template">
									<div class="api-interface">
										<p class="summary">API接口服务信息</p>
										<table class="info-table">
											{{#each serverlist}}
											<tr>
												<td class="first-col">服务名称：</td>
												<td>{{ws_name}}</td>
											</tr>
											<tr>
												<td class="first-col">服务描述：</td>
												<td>{{ws_describe}}</td>
											</tr>
											<tr>
												<td class="first-col">服务地址：</td>
												<td>{{ws_url}}</td>
											</tr>
											<tr>
												<td class="first-col">服务方法：</td>
												<td>{{ws_mtd}}</td>
											</tr>
											<tr>
												<td class="first-col">服务类型：</td>
												<td>{{ws_type}}</td>
											</tr>
											<tr>
												<td class="first-col">命名空间：</td>
												<td>{{ws_nsp}}</td>
											</tr>
											{{/each}}
										</table>
									</div>
									<div class="request-header">
										<p class="summary">请求信息</p>
										{{#each serverlist}}
										<p class="request-info">{{ws_soap_aq}}</p>
										{{/each}}
									</div>
									<div class="request-header">
										<p class="summary">响应信息</p>
										{{#each serverlist}}
										<p class="react-info">{{ws_soap_ap}}</p>
										{{/each}}
									</div>
									<div class="request-params">
										<p class="summary">请求参数</p>
										<table id="request-params" class="info-table">
											<thead>
												<tr>
													<td>名称</td>
													<td>类型</td>
													<td>长度</td>
													<td>是否必填</td>
													<td>默认值</td>
												</tr>
											</thead>
											<tbody>
												{{#each paramlist}}
												<tr>
													<td>{{PARAM_NAME}}</td>
													<td>{{PARAM_TYPE}}</td>
													<td>{{PARAM_LENGTH}}</td>
													<td>{{whether ISREQUIRED}}</td>
													<td>{{DFTVALUE}}</td>
												</tr>
												{{/each}}
											</tbody>
										</table>
									</div>
									<div class="return-params">
										<p class="summary">返回参数</p>
										<table id="return-params" class="info-table">
											<thead>
												<tr>
													<td>名称</td>
													<td>类型</td>
													<td>长度</td>
													<td>是否为空</td>
													<td>节点ID</td>
													<td>父节点ID</td>
												</tr>
											</thead>
											<tbody>
												{{#each sponselist}}
												<tr>
													<td>{{RESULT_NAME}}</td>
													<td>{{RESULT_TYPE}}</td>
													<td>{{RESULT_LENGTH}}</td>
													<td>{{whether ISNULLOK}}</td>
													<td>{{NODEID}}</td>
													<td>{{PID}}</td>
												</tr>
												{{/each}}
											</tbody>
										</table>
									</div>
								</script>
							</div>
						</div>
					</div>
					<div class="unlogin dn">
						<span class="no-server-txt">尚未登录，请登录后查看！</span>
					</div>
				</div>
				<div class="info-item others clearfix dn">
					<div class="logined">
						<div class="mis-matching dn">
	                		<p class="no-server">
	                    		<span class="no-server-txt">暂无数据</span>
	                    	</p>
	                	</div>
	                	<div class="matching">
							<div class="undocking dn">
								<span class="no-server-txt">数据资源尚未对接完成，请耐心等待或联系相关信息提供部门！</span>
							</div>
							<div class="unsubscribe dn">
								<span class="no-server-txt">
									您还未订阅该信息资源，成功订阅后后可以查看！ 
									<span class="toapply" onclick='toApply()'>点击申请订阅</span>
								</span>
							</div>
							<div class="normal others-normal">
								<p class="others-title">说明信息</p>
								<div id="others-details" class="others-details"></div>
							    <script id="others-details-template" type="text/x-handlebars-template">
									<ul>
										{{#each this}}
										<li class="clearfix">
											<span class="label fl">{{label}}</span>
											<span class="value fl" title='{{value}}'>{{value}}</span>
										</li>
										{{/each}}
									</ul>
								</script>
							</div>
						</div>
					</div>
					<div class="unlogin dn">
						<span class="no-server-txt">尚未登录，请登录后查看！</span>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
@@include('../components/footer.html')
</body>
@@include('../components/js.html')
<script src="../../js/common/echarts.min.js"></script>
<script src="../../js/common/jquery.pagination.js"></script>
<script src="../../js/directory/directory-resources-details.js"></script>
</html>